package demo;

import redis.clients.jedis.Jedis;

import java.util.Set;

public class Test3 {
    public static void main(String[] args) {
        Jedis jedis = new Jedis("hadoop10", 6379);
        jedis.auth("123");

        jedis.zadd("book",95,"三国演义");
        jedis.zadd("book",93,"西游记");
        jedis.zadd("book",91,"水浒传");
        jedis.zadd("book",95,"红楼梦");

        Set<String> set = jedis.zrevrange("book", 0, 10);
        for (String s : set) {
            System.out.println(s);
        }

        jedis.close();
    }
}
